package service;

import utils.Role;

public class Node {
    private String nodeId;
    private String address;
    private Role role;

    public Node() {
    }

    public Node(String nodeId, String address, Role role) {
        this.nodeId = nodeId;
        this.address = address;
        this.role = role;
    }

    /**
     * 获取
     * @return nodeId
     */
    public String getNodeId() {
        return nodeId;
    }

    /**
     * 设置
     * @param nodeId
     */
    public void setNodeId(String nodeId) {
        this.nodeId = nodeId;
    }

    /**
     * 获取
     * @return address
     */
    public String getAddress() {
        return address;
    }

    /**
     * 设置
     * @param address
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * 获取
     * @return role
     */
    public Role getRole() {
        return role;
    }

    /**
     * 设置
     * @param role
     */
    public void setRole(Role role) {
        this.role = role;
    }

    public String toString() {
        return "Node{nodeId = " + nodeId + ", address = " + address + ", role = " + role + "}";
    }
}
